package jvm;

import java.util.Vector;

import common.domain.User;

public class MemoryLeak {

	public static void main(String[] args) {
		test3();
	}
	public static void test2(){
		Vector<Integer>v = new Vector<Integer>();
		Integer i = new Integer(1000);
		v.add(i);
		System.out.println(v.get(0));
		i= new Integer(1002);
		System.out.println(v.get(0));
	}
	public static void test3(){
		Vector<User> v = new Vector<User>();
		User u = new User("test1", 1);
		v.add(u);
		System.out.println(v.get(0).getAge());
		u.setAge(2);
		System.out.println(v.get(0).getAge());
	}
}
